﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace AppManager.DomainModel
{
    /// <summary>
    ///     添加和修改的時候的Model
    /// </summary>
    public class Sys_MenuEidtModel
    {
        public Sys_MenuEidtModel()
        {
            Link = "";
        }
        public int Id { get; set; }
        [Display(Name = "菜单名称")]
        [Required(ErrorMessage = "请输入菜单名称")]
        public string Name { get; set; }
        [Display(Name = "菜单链接")]
        public string Link { get; set; }
        public bool Flag { get; set; }
        public int ParentId { get; set; }
    }


    #region 菜单下拉框
    public class MenuSelectModel
    {
        public List<MenuListModel> Menus { get; set; }
    }

    public class MenuListModel
    {
        public string Text { get; set; }
        public string Value { get; set; }
        public List<MenuListModel> Childs { get; set; }
    }

    #endregion

    #region Sort
    public class SortModel
    {
        public int sort { get; set; }
        public int id { get; set; }
        public int parentid { get; set; }
    }
    #endregion

    #region Shared,Sidebar

    public class SidebarMenu
    {
        public string Url { get; set; }
        public string Name { get; set; }
        public List<SidebarMenu> Childs { get; set; }
    }
    #endregion
}